package fr.labri.macchiato.feature.localRepositoryJson;

import java.util.List;

import fr.labri.macchiato.core.model.Project;
import fr.labri.macchiato.core.technical.Encoder;

/**
 * The project repository stores {@link Project}s into the browser's html5 cache
 * 
 * @author Matthieu FOUCAULT
 * 
 */
public class ProjectRepository extends StorageRepository<Project, String> {

	/**
	 * Creates a new repository able to store project in the HTML5 local or
	 * session storage
	 * 
	 * @param useLocalStorage
	 */
	public ProjectRepository(boolean useLocalStorage) {
		super(useLocalStorage);
	}

	@Override
	protected String getKeyPrefix() {
		return "PROJECT_";
	}

	@Override
	protected Encoder<List<String>> getIdsEncoder() {
		return new StringListEncoder();
	}

	@Override
	protected String getEncodedEntity(Project entity) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected Project getDecodedEntity(String string) {
		// TODO Auto-generated method stub
		return null;
	}

}
